#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n, x;
	cin>>n;
	n = 0;
	while(cin>>x)
		n ^= x;
	cout<<n;
	return 0;
}

